Don't append a * to the pattern to complete if the user entered one
authorTor Lillqvist <tml@src.gnome.org>
Sat, 13 Mar 1999 01:24:10 +0000 (01:24 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sat, 13 Mar 1999 01:24:10 +0000 (01:24 +0000)
herself.  This way one can complete *.h and don't get matches on any
.help files, for instance.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkfilesel.c

index 7ac915d9522b4661ef7a955b75e0ef6e074e9891..189e0810ec1b37e942d548c528e18e8c9a84a649 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,9 +5,13 @@
        * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32
        version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde
        expansion (based on HAVE_PWD_H), allow for drive letters. UNC
-       names not handled yet. Also, code from Craig Setera's port to
-       Win32 that uses cygwin.dll
+       paths (\\server\share\...) not handled yet. Also, code from Craig
+       Setera's port to Win32 that uses cygwin.dll
 
+       * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if
+       the user entered one herself.  This way one can complete *.h and
+       don't get matches on any .help files, for instance.
+       
 Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>
 
         * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
index 7ac915d9522b4661ef7a955b75e0ef6e074e9891..189e0810ec1b37e942d548c528e18e8c9a84a649 100644 (file)
@@ -5,9 +5,13 @@
        * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32
        version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde
        expansion (based on HAVE_PWD_H), allow for drive letters. UNC
-       names not handled yet. Also, code from Craig Setera's port to
-       Win32 that uses cygwin.dll
+       paths (\\server\share\...) not handled yet. Also, code from Craig
+       Setera's port to Win32 that uses cygwin.dll
 
+       * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if
+       the user entered one herself.  This way one can complete *.h and
+       don't get matches on any .help files, for instance.
+       
 Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>
 
         * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
index 7ac915d9522b4661ef7a955b75e0ef6e074e9891..189e0810ec1b37e942d548c528e18e8c9a84a649 100644 (file)
@@ -5,9 +5,13 @@
        * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32
        version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde
        expansion (based on HAVE_PWD_H), allow for drive letters. UNC
-       names not handled yet. Also, code from Craig Setera's port to
-       Win32 that uses cygwin.dll
+       paths (\\server\share\...) not handled yet. Also, code from Craig
+       Setera's port to Win32 that uses cygwin.dll
 
+       * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if
+       the user entered one herself.  This way one can complete *.h and
+       don't get matches on any .help files, for instance.
+       
 Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>
 
         * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
index 7ac915d9522b4661ef7a955b75e0ef6e074e9891..189e0810ec1b37e942d548c528e18e8c9a84a649 100644 (file)
@@ -5,9 +5,13 @@
        * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32
        version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde
        expansion (based on HAVE_PWD_H), allow for drive letters. UNC
-       names not handled yet. Also, code from Craig Setera's port to
-       Win32 that uses cygwin.dll
+       paths (\\server\share\...) not handled yet. Also, code from Craig
+       Setera's port to Win32 that uses cygwin.dll
 
+       * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if
+       the user entered one herself.  This way one can complete *.h and
+       don't get matches on any .help files, for instance.
+       
 Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>
 
         * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
index 7ac915d9522b4661ef7a955b75e0ef6e074e9891..189e0810ec1b37e942d548c528e18e8c9a84a649 100644 (file)
@@ -5,9 +5,13 @@
        * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32
        version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde
        expansion (based on HAVE_PWD_H), allow for drive letters. UNC
-       names not handled yet. Also, code from Craig Setera's port to
-       Win32 that uses cygwin.dll
+       paths (\\server\share\...) not handled yet. Also, code from Craig
+       Setera's port to Win32 that uses cygwin.dll
 
+       * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if
+       the user entered one herself.  This way one can complete *.h and
+       don't get matches on any .help files, for instance.
+       
 Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>
 
         * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
index 7ac915d9522b4661ef7a955b75e0ef6e074e9891..189e0810ec1b37e942d548c528e18e8c9a84a649 100644 (file)
@@ -5,9 +5,13 @@
        * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32
        version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde
        expansion (based on HAVE_PWD_H), allow for drive letters. UNC
-       names not handled yet. Also, code from Craig Setera's port to
-       Win32 that uses cygwin.dll
+       paths (\\server\share\...) not handled yet. Also, code from Craig
+       Setera's port to Win32 that uses cygwin.dll
 
+       * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if
+       the user entered one herself.  This way one can complete *.h and
+       don't get matches on any .help files, for instance.
+       
 Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>
 
         * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
index 7ac915d9522b4661ef7a955b75e0ef6e074e9891..189e0810ec1b37e942d548c528e18e8c9a84a649 100644 (file)
@@ -5,9 +5,13 @@
        * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32
        version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde
        expansion (based on HAVE_PWD_H), allow for drive letters. UNC
-       names not handled yet. Also, code from Craig Setera's port to
-       Win32 that uses cygwin.dll
+       paths (\\server\share\...) not handled yet. Also, code from Craig
+       Setera's port to Win32 that uses cygwin.dll
 
+       * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if
+       the user entered one herself.  This way one can complete *.h and
+       don't get matches on any .help files, for instance.
+       
 Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>
 
         * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
index 16091ceb546ab94408a410094f227e8f50158802..9b217c65d365f696a15243613b5b803125ae43f5 100644 (file)
@@ -2797,7 +2797,12 @@ attempt_file_completion(CompletionState *cmpl_state)
 
       pat_buf = g_new (gchar, len + 2);
       strcpy(pat_buf, dir->cmpl_text);
-      strcpy(pat_buf + len, "*");
+      /* Don't append a * if the user entered one herself.
+       * This way one can complete *.h and don't get matches
+       * on any .help files, for instance.
+       */
+      if (strchr(pat_buf, '*') == NULL)
+       strcpy(pat_buf + len, "*");
     }
 
   if(first_slash)